<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>AND/OR/NAND/NOR-Gatter</title>
</head>

<body bgcolor="FFFFFF">

<table><tr><td>
<img align="center" src="../../../../icons/andGate.gif" width="32" height="32">
<img align="center" src="../../../../icons/orGate.gif" width="32" height="32">
<img align="center" src="../../../../icons/nandGate.gif" width="32" height="32">
<img align="center" src="../../../../icons/norGate.gif" width="32" height="32"><br>
<img align="center" src="../../../../icons/andGateRect.gif" width="32" height="32">
<img align="center" src="../../../../icons/orGateRect.gif" width="32" height="32">
<img align="center" src="../../../../icons/nandGateRect.gif" width="32" height="32">
<img align="center" src="../../../../icons/norGateRect.gif" width="32" height="32">
</td><td valign="center"><h1><em>AND/OR/NAND/NOR-Gatter</em></h1></td></tr></table>

<p><table>
<tr><td><strong>Bibliothek:</strong></td>
	<td><a href="index.html">Base</a></td></tr>
<tr><td><strong>Eingeführt:</strong></td>
	<td>2.0 Beta 1</td></tr>
<tr><td valign="top"><strong>Aussehen:</strong></td>
	<td valign="top"><table>
	<tr><th></th>
		<th width="50">AND</th>
		<th width="50">OR</th>
		<th width="50">NAND</th>
		<th width="50">NOR</th></tr>
	<tr><th valign="middle" height="65" align="left">Shaped:</th>
	    <td rowspan="3" colspan="4">
	       <img src="../../../../img-libs/gates-basic.png" width="294" height="206">
	    </td></tr>
	<tr><th valign="middle" height="65" align="left">Rectangular:</th></tr>
	<tr><th valign="middle" height="65" align="left">DIN 40700:</th></tr>
	</table></td>
</tr></table></p>

<h2>Verhalten</h2>

<p>The AND, OR, NAND, and NOT gates each compute the respective
function of the inputs, and emit the result on the output.</p>

<p>By default, any inputs that are left unconnected are ignored
— that's if the input truly has nothing attached to it,
not even a wire.
In this way, you can insert a 5-input gate but only attach two inputs,
and it will work as a 2-input gate;
this relieves you from having to worry about configuring
the number of inputs every time you create a gate.
(If all inputs are unconnected, the output is the error value <em>X</em>.)
Some users, though, prefer that Logisim insist that all inputs be connected,
since this is what corresponds to real-world gates.
You can enable this behavior by going to the Project &gt; Options… menu item,
selecting the Simulation tab, and
selecting <q>Error for undefined inputs</q> for
<q>Gate Output When Undefined.</q></p>

<p>The two-input truth table for the gates is the following.
(The letter <em>X</em> represents the error value,
and the letter <em>Z</em> represents the floating value.)</p>

<center><table>
<tr><td><table>
<tr><th colspan="4" align="center"><b>AND</b></th></tr>
<tr><td></td><th align="center">0</th><th align="center">1</th><th align="center">X/Z</th></tr>
<tr><th align="center">0</th><td align="center">0</td><td align="center">0</td><td align="center">0</td></tr>
<tr><th align="center">1</th><td align="center">0</td><td align="center">1</td><td align="center">X</td></tr>
<tr><th align="center">X/Z</th><td align="center">0</td><td align="center">X</td><td align="center">X</td></tr>
</table></td><td>&nbsp;&nbsp;&nbsp;</td><td><table>
<tr><th colspan="4" align="center"><b>OR</b></th></tr>
<tr><td></td><th align="center">0</th><th align="center">1</th><th align="center">X/Z</th></tr>
<tr><th align="center">0</th><td align="center">0</td><td align="center">1</td><td align="center">X</td></tr>
<tr><th align="center">1</th><td align="center">1</td><td align="center">1</td><td align="center">1</td></tr>
<tr><th align="center">X/Z</th><td align="center">X</td><td align="center">1</td><td align="center">X</td></tr>
</table></td></tr><tr><td><table>
<tr><th colspan="4" align="center"><b>NAND</b></th></tr>
<tr><td></td><th align="center">0</th><th align="center">1</th><th align="center">X/Z</th></tr>
<tr><th align="center">0</th><td align="center">1</td><td align="center">1</td><td align="center">1</td></tr>
<tr><th align="center">1</th><td align="center">1</td><td align="center">0</td><td align="center">X</td></tr>
<tr><th align="center">X/Z</th><td align="center">1</td><td align="center">X</td><td align="center">X</td></tr>
</table></td><td>&nbsp;&nbsp;&nbsp;</td><td><table>
<tr><th colspan="4" align="center"><b>NOR</b></th></tr>
<tr><td></td><th align="center">0</th><th align="center">1</th><th align="center">X/Z</th></tr>
<tr><th align="center">0</th><td align="center">1</td><td align="center">0</td><td align="center">X</td></tr>
<tr><th align="center">1</th><td align="center">0</td><td align="center">0</td><td align="center">0</td></tr>
<tr><th align="center">X/Z</th><td align="center">X</td><td align="center">0</td><td align="center">X</td></tr>
</table></td></tr></table></center>

<p>In short, these components work as expected as long as all inputs
are either 0 or 1.
If an input is neither 0 nor 1 (it is floating or it is the error value)
then the component treats it as both 0 <em>and</em> 1:
If the output would be the same both ways
(as when an AND gate has one input that is definitely 0
and a questionable second input), that will be the output value;
but if the output changes depending on whether it is 0 or 1,
the output is the error value.</p>

<p>The multi-bit versions of each gate will perform its one-bit
transformation bitwise on its inputs.</p>

<h2>Pins (wenn das Bauelement nach Osten zeigt)</h2>

<dl>

<dt>West edge (inputs, bit width according to Data Bits attribute)</dt>
<dd><p>The inputs into the component. There will be as many of these as
specified in the Number of Inputs attribute.</p>

<p>Note that if you are using shaped gates, the west side of OR and NOR
gates will be curved. Nonetheless, the input pins are in a line. Logisim
will draw short stubs illustrating this; and if you overshoot a stub, it
will silently assume that you did not mean to overshoot it. In "printer
view", these stubs will not be drawn unless they are connected to
wires.</p></dd>

<dt>East edge (output, bit width according to Data Bits attribute)</dt>
<dd><p>The gate's output, whose value is computed based on the current
inputs as described above.</p></dd>

</dl>

<h2>Attribute</h2>

<p>When the component is selected or being added,
the digits '0' through '9' alter its <q>Number of Inputs</q> attribute,
Alt-0 through Alt-9 alter its <q>Data Bits</q> attribute,
and the arrow keys alter its <q>Facing</q> attribute.</p>

<dl>

<dt>Ausrichtung</dt>
<dd>The direction of the component (its output relative to its inputs).</dd>

<dt>Data Bits</dt>
<dd>The bit width of the component's inputs and outputs.</dd>

<dt>Gate Size</dt>
<dd>Determines whether to draw a wider or narrower version of the
component. This does not affect the number of inputs, which is specified
by the Number of Inputs attribute. However, if shaped gates are selected,
then the gate will be drawn with <q>wings</q> to accommodate additional inputs
beyond what the shape naturally accommodates.</dd>

<dt>Number of Inputs</dt>
<dd>Determines how many pins to have for the component on its west
side.</dd>

<dt>Label</dt>
<dd>The text within the label associated with the gate.</dd>

<dt>Label Font</dt>
<dd>The font with which to render the label.</dd>

<dt>Negate <var>x</var></dt>
<dd>If <q>yes</q>, the input is negated before it is fed into the gate.
The inputs are counted top-down if the facing is east or west,
and they are counted left-to-right if the facing is north or south.</dd>

</dl>

<h2>Verhalten des Schaltwerkzeugs</h2>

<p>Keines.</p>

<h2>Verhalten des Textwerkzeugs</h2>

<p>Allows the label associated with the gate to be edited.</p>

<p><a href="../index.html">Zurück zur <em>Bibliotheksreferenz</em></a></p>

</body>
</html>
